<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <script>
         // 字面量
        var o1={name:'1'};
        var o2 = new Object({name:'02'});

         // 构造函数
        var M=function (name) {
            this.name=name;

        }
        var o3=new M('03')
        // Object.create()

        var p={name:'04'};
        var o4=Object.create(p);

        M.prototype.say=function () {
            console.log('sayhi');
        }
        var o5=new M();

    </script>

</body>
</html>